Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow CPLB to work with externalAddress #4452

Closed

Conversation

juanluisvaladas
Copy link
Contributor

Description

Allow this behavior if the endpoint-reconciler is disabled.

K0smotron needs to use external address for cluster API. The only limitation why we couldn't combine externalAddress and CPLB is the endpoint-reconciler, since it can be disabled, allow to run CPLB with externalAddress if the user manually disables it.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Manual test
  • Auto test added

Checklist:

  • My code follows the style guidelines of this project
  • My commit messages are signed-off
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@juanluisvaladas juanluisvaladas requested a review from a team as a code owner May 20, 2024 12:09
@juanluisvaladas juanluisvaladas added the backport/release-1.30 PR that needs to be backported/cherrypicked to the release-1.30 branch label May 20, 2024
@juanluisvaladas juanluisvaladas force-pushed the cplb-extaddr branch 4 times, most recently from 292e70c to 473584e Compare May 21, 2024 08:44
Allow this behavior if the endpoint-reconciler is disabled.

Signed-off-by: Juan-Luis de Sousa-Valadas Castaño <[email protected]>
@twz123
Copy link
Member

twz123 commented May 22, 2024

K0smotron needs to use external address for cluster API.

Can you elaborate? K0smotron can simply use the CPLB addresses without k0s using them. Is that backport really required?

@juanluisvaladas
Copy link
Contributor Author

Can you elaborate? K0smotron can simply use the CPLB addresses without k0s using them.

Yes, but k0smotron would have to be modified as it's hardcoded to set the externalAddress. That's an option too.

Is that backport really required?

From a purely technical point of view no, but this was requested by sales and it's important for one potential customer. I don't see many downsides to backporting so I'd say we should backport it.

@twz123
Copy link
Member

twz123 commented May 23, 2024

I think i slowly get what this is about 😅 Can you maybe write up an example use case to better explain what this PR actually unblocks?

@@ -92,6 +93,9 @@ func (k *Keepalived) Start(_ context.Context) error {
}

if len(k.Config.VirtualServers) > 0 {
if k.HasEndpointReconciler {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about moving that check out the component into the controller command? Otherwise the HasEndpointReconciler flag is just some "I will fail to start" flag.

@@ -33,6 +33,8 @@ type keepalivedSuite struct {

const haControllerConfig = `
spec:
api:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we test both setups here? One with externalAddress and one with NLLB?

@@ -228,24 +228,26 @@ func (c *command) start(ctx context.Context) error {
nodeComponents.Add(ctx, controllerLeaseCounter)
}

disableEndpointReconciler := !slices.Contains(c.DisableComponents, constant.APIEndpointReconcilerComponentName) &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition is also used at line 436/438 for the endpoint reconciler component itself. Would be cool to reuse this boolean there as well. And it could deserve a less ambiguous name: Basically it swaps endpoint reconcilers. What about naming this preferExternalAddressEndpointReconciler, preferK0sEndpointReconciler or sth. like that?

Copy link
Contributor

The PR is marked as stale since no activity has been recorded in 30 days

Copy link
Contributor

The PR is marked as stale since no activity has been recorded in 30 days

@github-actions github-actions bot added Stale and removed Stale labels Jul 24, 2024
Copy link
Contributor

The PR is marked as stale since no activity has been recorded in 30 days

@github-actions github-actions bot added the Stale label Aug 25, 2024
@juanluisvaladas
Copy link
Contributor Author

Closing this for now. Will reopen after merging userspace reverse proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/release-1.30 PR that needs to be backported/cherrypicked to the release-1.30 branch Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants